﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LibBinary.FileData
{
    public abstract class AbstractFileData
    {
        public AbstractFileData Parent { get; private set; }

        public AbstractFileData(AbstractFileData parent)
        {
            this.Parent = parent;
        }

        //TODO make two functions, throw and no throw
        public T As<T>() where T : AbstractFileData
        {
            return this as T;
        }

        public abstract AbstractFileData GetChild(int index);
    }
}
